using System.Collections.Generic;

namespace DesignPattern.Behavioral.Observer
{
    public class BellEvent
    {
        private List<IBellEventListener> _bellEventListeners = new List<IBellEventListener>();

        public void AddBellEventListener(IBellEventListener listener)
        {
            _bellEventListeners.Add(listener);
        }

        public void Ring(string ringType)
        {
            foreach (var listenser in _bellEventListeners)
            {
                listenser.HearBellRing(ringType);
            }
        }
    }
}